.digital-human {
  max-width: 800px;
  margin: 0 auto;
}

.digital-human .ant-card-body {
  padding: 0 !important;
}

.digital-human-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.control-buttons .ant-btn {
  min-width: 80px;
}

.message-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  min-height: 200px;
}

.loading-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.loading-container p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.media-container video {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  /* 减少视频闪烁的样式 */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  /* 确保视频元素在没有内容时保持透明 */
  background-color: transparent !important;
  background: transparent !important;
}

/* 视频容器样式 */
.video-container {
  transition: opacity 0.3s ease-in-out;
  will-change: opacity;
}

.video-container.connected {
  opacity: 1;
  pointer-events: auto;
}

.video-container.disconnected {
  opacity: 0;
  pointer-events: none;
}

/* 当视频没有srcObject时，确保背景透明 */
.media-container video:not([srcObject]) {
  background-color: transparent !important;
  background: transparent !important;
}

.session-info {
  text-align: center;
  color: #666;
  font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .digital-human {
    margin: 0 8px;
  }
  
  .control-buttons {
    justify-content: center;
  }
  
  .media-container video {
    width: 300px !important;
    max-width: 100% !important;
  }
} 